package com.d3works.apps.project.service;

import com.d3works.apps.base.db.Company;
import com.d3works.apps.base.db.Partner;
import com.d3works.apps.project.db.Project;
import com.d3works.apps.project.db.ProjectStatus;
import com.d3works.apps.project.db.ProjectTemplate;
import com.d3works.auth.db.User;
import com.d3works.exception.D3worksException;
import com.d3works.meta.CallMethod;
import java.util.Map;
import java.util.Set;

public interface ProjectService {
  Project generateProject(
      Project parentProject,
      String fullName,
      User assignedTo,
      Company company,
      Partner clientPartner);

  /**
   * Generate a project from a partner.
   *
   * @param partner
   * @return
   */
  Project generateProject(Partner partner);

  public Project createProjectFromTemplate(
      ProjectTemplate projectTemplate, String projectCode, Partner clientPartner)
      throws D3worksException;

  public Map<String, Object> createProjectFromTemplateView(ProjectTemplate projectTemplate)
      throws D3worksException;

  public Map<String, Object> getTaskView(
      Project project, String title, String domain, Map<String, Object> context);

  public Project generateProject(
      ProjectTemplate projectTemplate, String projectCode, Partner clientPartner);

  public Map<String, Object> getPerStatusKanban(Project project, Map<String, Object> context);

  public String getTimeZone(Project project);

  public ProjectStatus getDefaultProjectStatus();

  boolean checkIfResourceBooked(Project project);

  public void getChildProjectIds(Set<Long> projectIdsSet, Project project);

  @CallMethod
  public Set<Long> getContextProjectIds();

  @CallMethod
  public String getContextProjectIdsString();
}
